<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>地址标准化管理系统</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: "Microsoft YaHei", sans-serif;
        }
        
        body {
            display: flex;
            flex-direction: column;
            height: 100vh;
            background-color: #f5f7fa;
            color: #333;
            overflow: hidden;
        }
        
        /* 顶部导航栏 */
        .top-bar {
            background-color: #2c3e50;
            color: white;
            padding: 0 20px;
            height: 60px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            box-shadow: 0 2px 5px rgba(0,0,0,0.1);
            z-index: 1000;
        }
        
        .logo {
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 20px;
            font-weight: 500;
        }
        
        .logo i {
            font-size: 24px;
        }
        
        .user-menu {
            display: flex;
            align-items: center;
            gap: 20px;
        }
        
        .user-info {
            display: flex;
            align-items: center;
            gap: 10px;
            cursor: pointer;
            padding: 8px 12px;
            border-radius: 4px;
            transition: all 0.2s;
        }
        
        .user-info:hover {
            background-color: #34495e;
        }
        
        .user-avatar {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            background-color: #3498db;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        /* 主内容区域 */
        .main-container {
            display: flex;
            flex: 1;
            overflow: hidden;
        }
        
        /* 侧边导航栏 */
        .sidebar {
            width: 240px;
            background-color: white;
            box-shadow: 2px 0 5px rgba(0,0,0,0.05);
            overflow-y: auto;
            transition: all 0.3s;
            z-index: 100;
        }
        
        .sidebar.collapsed {
            width: 60px;
        }
        
        .sidebar-toggle {
            padding: 15px;
            display: flex;
            justify-content: flex-end;
            color: #95a5a6;
            cursor: pointer;
        }
        
        .sidebar-toggle:hover {
            color: #3498db;
        }
        
        .nav-menu {
            list-style: none;
        }
        
        .nav-item {
            margin-bottom: 5px;
        }
        
        .nav-link {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 12px 20px;
            color: #2c3e50;
            text-decoration: none;
            transition: all 0.2s;
            cursor: pointer;
        }
        
        .nav-link:hover {
            background-color: #f5f7fa;
            color: #3498db;
        }
        
        .nav-link.active {
            background-color: #e3f2fd;
            color: #3498db;
            border-left: 3px solid #3498db;
        }
        
        .nav-link i {
            width: 20px;
            text-align: center;
        }
        
        .nav-text {
            flex: 1;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        
        .sidebar.collapsed .nav-text {
            display: none;
        }
        
        .sidebar.collapsed .nav-link {
            padding: 12px;
            justify-content: center;
        }
        
        /* 内容区域 */
        .content-wrapper {
            flex: 1;
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }
        
        .content {
            flex: 1;
            overflow: hidden;
            position: relative;
        }
        
        .content iframe {
            width: 100%;
            height: 100%;
            border: none;
            display: block;
        }
        
        .menu-section-title {
            padding: 15px 20px 8px;
            color: #95a5a6;
            font-size: 13px;
            text-transform: uppercase;
            letter-spacing: 1px;
        }
        
        .sidebar.collapsed .menu-section-title {
            display: none;
        }
        
        /* 面包屑导航 */
        .breadcrumb {
            padding: 15px 20px;
            background-color: white;
            border-bottom: 1px solid #eee;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        
        .breadcrumb-item {
            color: #7f8c8d;
        }
        
        .breadcrumb-item.active {
            color: #2c3e50;
            font-weight: 500;
        }
        
        .breadcrumb-separator {
            color: #95a5a6;
        }
        
        /* 响应式调整 */
        @media (max-width: 768px) {
            .sidebar {
                position: absolute;
                height: 100%;
                transform: translateX(-100%);
            }
            
            .sidebar.mobile-visible {
                transform: translateX(0);
            }
            
            .mobile-menu-toggle {
                display: block;
            }
        }
        
        .mobile-menu-toggle {
            display: none;
            padding: 10px;
            cursor: pointer;
            color: white;
        }
    </style>
</head>
<body>
    <!-- 顶部导航栏 -->
    <div class="top-bar">
        <div class="left-section">
            <div class="mobile-menu-toggle" id="mobileMenuToggle">
                <i class="fas fa-bars"></i>
            </div>
            <div class="logo">
                <i class="fas fa-map-marker-alt"></i>
                <span>地址标准化管理系统</span>
            </div>
        </div>
        <div class="user-menu">
            <div class="user-info">
                <div class="user-avatar">
                    <i class="fas fa-user"></i>
                </div>
                <span>管理员</span>
                <i class="fas fa-chevron-down"></i>
            </div>
        </div>
    </div>
    
    <!-- 主内容区域 -->
    <div class="main-container">
        <!-- 侧边导航栏 -->
        <div class="sidebar" id="sidebar">
            <div class="sidebar-toggle" id="sidebarToggle">
                <i class="fas fa-chevron-left"></i>
            </div>
            
            <ul class="nav-menu">
                <li class="menu-section-title">原始数据管理</li>
                <li class="nav-item">
                    <a class="nav-link" data-page="original-address-overview.html" onclick="loadPage('original-address-overview.html', '原始数据概览')">
                        <i class="fas fa-database"></i>
                        <span class="nav-text">原始数据概览</span>
                    </a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" data-page="original-address-construction.html" onclick="loadPage('original-address-construction.html', '住建局原始数据')">
                        <i class="fas fa-building"></i>
                        <span class="nav-text">住建局数据</span>
                    </a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" data-page="original-address-heating.html" onclick="loadPage('original-address-heating.html', '供热系统原始数据')">
                        <i class="fas fa-fire"></i>
                        <span class="nav-text">供热系统数据</span>
                    </a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" data-page="original-address-gas.html" onclick="loadPage('origin-address-gas.html', '燃气系统原始数据')">
                        <i class="fas fa-burn"></i>
                        <span class="nav-text">燃气系统数据</span>
                    </a>
                </li>
                
                <li class="menu-section-title">关联管理</li>
                <li class="nav-item">
                    <a class="nav-link" data-page="address-relation.html" onclick="loadPage('address-relation.html', '关联管理')">
                        <i class="fas fa-link"></i>
                        <span class="nav-text">关联管理</span>
                    </a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" data-page="create-relation.html" onclick="loadPage('create-relation.html', '创建新关联')">
                        <i class="fas fa-plus"></i>
                        <span class="nav-text">创建新关联</span>
                    </a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" data-page="edit-relation.html" onclick="loadPage('edit-relation.html', '编辑关联')">
                        <i class="fas fa-edit"></i>
                        <span class="nav-text">编辑关联</span>
                    </a>
                </li>

                <li class="menu-section-title">审核管理</li>
                <li class="nav-item">
                    <a class="nav-link" data-page="pending-approval-address-list.html" onclick="loadPage('pending-approval-address-list.html', '待审核地址')">
                        <i class="fas fa-tasks"></i>
                        <span class="nav-text">待审核地址</span>
                    </a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" data-page="pending-address-grid.html" onclick="loadPage('pending-address-grid.html', '网格员审批工作台')">
                        <i class="fas fa-user-check"></i>
                        <span class="nav-text">网格员审批工作台</span>
                    </a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" data-page="pending-address-approve.html" onclick="loadPage('standard-address-management.html', '地址审核页')">
                        <i class="fas fa-exchange-alt"></i>
                        <span class="nav-text">地址审核页</span>
                    </a>
                </li>
                
                <li class="menu-section-title">标准地址管理</li>
                <li class="nav-item">
                    <a class="nav-link" data-page="address-list.html" onclick="loadPage('address-list.html', '地址列表')">
                        <i class="fas fa-list"></i>
                        <span class="nav-text">标准地址列表</span>
                    </a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" data-page="address-detail.html" onclick="loadPage('address-detail.html', '地址详情')">
                        <i class="fas fa-info-circle"></i>
                        <span class="nav-text">地址详情</span>
                    </a>
                </li>
                
                
                <li class="menu-section-title">API服务</li>
                <li class="nav-item">
                    <a class="nav-link" data-page="api-monitoring.html" onclick="loadPage('api-monitoring.html', 'API服务调用统计')">
                        <i class="fas fa-chart-line"></i>
                        <span class="nav-text">API调用统计</span>
                    </a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" data-page="api-call-details.html" onclick="loadPage('api-call-details.html', 'API调用详情')">
                        <i class="fas fa-list-alt"></i>
                        <span class="nav-text">调用记录详情</span>
                    </a>
                </li>
                
                <!-- 添加数据维护模块 -->
                <li class="menu-section-title">数据维护</li>
                <li class="nav-item">
                    <a class="nav-link" data-page="grid-list.html" onclick="loadPage('grid-list.html', '网格列表管理')">
                        <i class="fas fa-th-large"></i>
                        <span class="nav-text">网格列表管理</span>
                    </a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" data-page="grid-manager-list.html" onclick="loadPage('grid-manager-list.html', '网格员列表管理')">
                        <i class="fas fa-users"></i>
                        <span class="nav-text">网格员列表管理</span>
                    </a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" data-page="user-list.html" onclick="loadPage('user-list.html', '用户信息管理')">
                        <i class="fas fa-user-friends"></i>
                        <span class="nav-text">地址用户信息管理</span>
                    </a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" data-page="community-list.html" onclick="loadPage('community-list.html', '小区管理')">
                        <i class="fas fa-building"></i>
                        <span class="nav-text">小区管理</span>
                    </a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" data-page="region-list.html" onclick="loadPage('region-list.html', '区域管理')">
                        <i class="fas fa-map-marked-alt"></i>
                        <span class="nav-text">区域管理</span>
                    </a>
                </li>
            </ul>
        </div>
        
        <!-- 内容区域 -->
        <div class="content-wrapper">
            <!-- 面包屑导航 -->
            <div class="breadcrumb">
                <span class="breadcrumb-item">首页</span>
                <span class="breadcrumb-separator">/</span>
                <span class="breadcrumb-item active" id="currentPage">地址比对</span>
            </div>
            
            <!-- 内容框架 -->
            <div class="content">
                <iframe id="contentFrame" src="index.html" allowfullscreen></iframe>
            </div>
        </div>
    </div>
    
    <script>
        // 页面加载完成后执行初始化
        document.addEventListener('DOMContentLoaded', function() {
            // 初始化侧边栏切换
            initSidebar();
            
            // 默认加载首页
            loadPage('original-address-overview.html', '原始数据概览');
        });
        
        // 初始化侧边栏功能
        function initSidebar() {
            const sidebarToggle = document.getElementById('sidebarToggle');
            const sidebar = document.getElementById('sidebar');
            const mobileMenuToggle = document.getElementById('mobileMenuToggle');
            
            // 切换侧边栏展开/收起状态
            sidebarToggle.addEventListener('click', function() {
                sidebar.classList.toggle('collapsed');
                
                // 切换箭头方向
                const icon = sidebarToggle.querySelector('i');
                if (sidebar.classList.contains('collapsed')) {
                    icon.classList.remove('fa-chevron-left');
                    icon.classList.add('fa-chevron-right');
                } else {
                    icon.classList.remove('fa-chevron-right');
                    icon.classList.add('fa-chevron-left');
                }
            });
            
            // 移动端菜单切换
            mobileMenuToggle.addEventListener('click', function() {
                sidebar.classList.toggle('mobile-visible');
            });
        }
        
        // 加载页面到iframe
        function loadPage(url, pageName) {
            // 更新iframe地址
            document.getElementById('contentFrame').src = url;
            
            // 更新面包屑
            document.getElementById('currentPage').textContent = pageName;
            
            // 更新活动菜单项
            const navLinks = document.querySelectorAll('.nav-link');
            navLinks.forEach(link => {
                link.classList.remove('active');
                
                // 如果链接的data-page属性与当前URL匹配，则设为活动状态
                if (link.getAttribute('data-page') === url) {
                    link.classList.add('active');
                }
            });
            
            // 在移动设备上，点击菜单项后自动收起侧边栏
            if (window.innerWidth <= 768) {
                document.getElementById('sidebar').classList.remove('mobile-visible');
            }
        }
        
        // 处理从子页面发来的消息，实现页面间通信
        window.addEventListener('message', function(event) {
            // 检查消息来源安全性
            if (event.origin !== window.location.origin) return;
            
            // 处理子页面发来的导航请求
            if (event.data.action === 'navigate') {
                loadPage(event.data.url, event.data.pageName || '页面');
            }
        });
    </script>
</body>
</html> 